package com.example.comsumer;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
//@FeignClient(name = "PRODUCTER-CLIENT", fallback = OrderClientBack.class)
@FeignClient(name = "PRODUCTER-CLIENT", fallbackFactory = OrderClientBackFactory.class, path="/producter")
public interface OrderClient {

    @GetMapping("/order/{id}")
    String findById(@PathVariable("id") Long id);

}
